import request from '@/utils/request';

/**
 * 获取系统管理账号
 * @param {*} params
 */
export async function getManageList(params) {
  return request('/user/page', {
    method: 'GET',
    params,
  });
}

// 新增     params
export async function addManage(params) {
  return request('/user/add', {
    method: 'POST',
    data: params,
  });
}

// 查询字段信息
export async function getFieldList(params) {
  return request('/dictionary', {
    method: 'GET',
    params,
  });
}

//
// 编辑字段信息 params：remarks、code
export async function updateManage(params) {
  return request('/user/update', {
    method: 'PUT',
    data: params,
  });
}

// 删除
export async function deleteManage(params) {
  return request(`/user/delete/${params.id}`, {
    method: 'DELETE',
    data: params,
  });
}

// 根据角色组查询接口认证主体select
export async function roleSelect(params) {
  return request('/roleGroup/all', {
    method: 'GET',
    params,
  });
}

// 用户角色select调用 roleGroup/all

export async function manageSelect(params) {
  return request('/role/findByGroup', {
    method: 'GET',
    params,
  });
}
